package br.com.insight.consultoria.negocio.bo;

import java.util.List;

import br.com.insight.consultoria.entity.AreaAtuacao;
import br.com.insight.consultoria.erro.exception.InsightConstants;
import br.com.insight.consultoria.erro.exception.InsightException;
import br.com.insight.consultoria.erro.exception.SistemaException;
import br.com.insight.consultoria.integracao.dao.interfacedao.AreaAtuacaoDAO;
import br.com.insight.consultoria.negocio.bo.interfacebo.AreaAtuacaoBO;

public class AreaAtuacaoImpBO implements AreaAtuacaoBO{

	private AreaAtuacaoDAO areaAtuacaoDAO;
	
	public List<AreaAtuacao> listarAreaAtuacao()throws InsightException{
		return getAreaAtuacaoDAO().listarAreaAtuacao();
	}
	
	public AreaAtuacao getAreaAtuacao(Long id)throws InsightException {
		
		try{
		
		return getAreaAtuacaoDAO().getAreaAtuacao(id);
		
		}catch(InsightException exception){
			
			throw exception;
			
		}catch(Exception exception){
			
			throw new SistemaException(InsightConstants.MENSAGEM_ERRO_NAO_TRATADO,exception);
			
		}
		
	}

	public AreaAtuacaoDAO getAreaAtuacaoDAO() {
		return areaAtuacaoDAO;
	}

	public void setAreaAtuacaoDAO(AreaAtuacaoDAO areaAtuacaoDAO) {
		this.areaAtuacaoDAO = areaAtuacaoDAO;
	}

	
	
}
